package com.neu.questionnaireplus.entity;

import com.neu.questionnaireplus.utils.common.Phone;
import java.util.Date;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
public class Tenement {
  private String id;

  @NotNull(message = "用户名不能为空")
  @Size(min = 2,max = 64,message = "用户名长度必须在2-64个字符")
  private String username;

  @NotNull(message = "密码不能为空")
  @Size(min = 6,max = 64,message = "密码长度必须在6-64个字符")
  private String password;//md5加密后

  @NotNull(message = "手机号不能为空")
  @Size(min = 11,max = 11,message = "手机号长度不正确")
  @Phone(message = "手机号格式不正确")
  private String telnumber;//md5加密后

  @NotNull(message = "密保问题不能为空")
  @Size(min = 4, max = 64, message = "密保问题长度必须在4-64个字符")
  private String securityQuestionContext;//密保问题

  @NotNull(message = "密保答案不能为空")
  @Size(min = 4, max = 64, message = "密保答案长度必须在4-64个字符")
  private String securityQuestionAnswer;//密保答案

  private Integer status;

  private Date createdDate;

  private Date lastLoginDate;

  private Integer delFlag;

  private Double costNow;

  private Double historyCost;

}
